CC := gcc  
SQLITE:= -lsqlite3
PTHREAD:= -lpthread
# 定义目标  
all: server client  

server: staff-server-main.o staff-server.o  
	$(CC) -o $@ $^ $(SQLITE) $(PTHREAD)

client: staff-client-main.o staff-client.o  
	$(CC) -o $@ $^ $(SQLITE) $(PTHREAD)

# 编译规则  
%.o: %.c  
	$(CC) -c $< -o $@  $(SQLITE) $(PTHREAD)

# 删除生成的文件  
clean:  
	rm -f server client *.o  

.PHONY: all clean